// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import '@/directive/common'
import VueTouch from 'vue-touch'
import 'jquery'
import MuseUI from 'muse-ui'
import 'muse-ui/dist/muse-ui.css'
import '@/assets/weui.css'
import theme from 'muse-ui/lib/theme'
import 'muse-ui-loading/dist/muse-ui-loading.css'
import Loading from 'muse-ui-loading'
import navbar from '@/components/navbar'
import Toast from 'muse-ui-toast'
import contant from '@/system/contant'
// 引入全局组件
Vue.component('navbar', navbar)

theme.add('teal', {
  primary: '#4585f5'
}, 'light')
theme.use('teal')

Vue.config.productionTip = false
Vue.use(MuseUI)
Vue.use(Loading)
Vue.use(Toast)
Vue.use(VueTouch, { name: 'v-touch' })

// Toast.config({ position: 'top' })

window.contant = contant

/* eslint-disable no-new */
window.apiready = function () {
  // $('.head_clear').css('height', api.winWidth / 2.22)
  new Vue({
    el: '#app',
    router,
    store,
    components: { App },
    template: '<App/>'
  })
}
// apiready()
